# yaml-cpp 模块
if(NOT TARGET YAML_CPP::YAML_CPP AND WITH_YAML_CPP)
    # 创建导入目标
    add_library(YAML_CPP::YAML_CPP STATIC IMPORTED)
    # 导入目标属性设置
    set_target_properties(YAML_CPP::YAML_CPP PROPERTIES
        VERSION ${YAML_CPP_TAG}
        IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"
        IMPORTED_LOCATION ${MODULE_INSTALL_DIR}/yaml-cpp/${YAML_CPP_TAG}/lib/libyaml-cppd.a
        INTERFACE_INCLUDE_DIRECTORIES ${MODULE_INSTALL_DIR}/yaml-cpp/${YAML_CPP_TAG}/include
    )
    #依赖库
    add_dependencies(YAML_CPP::YAML_CPP yaml-cpp-${YAML_CPP_TAG})
endif()